<template>
  <div class="page-content padding-top">
    <item v-for="item in arr" @click.native="selectItem(item.modelId,item.modelName)">{{item.modelName}}</item>
  </div>
</template>
<script>
import { bus } from 'bus.js'
 // ...

  export default {
    data() {
      return {
        arr:[],
        seriesId:null,
      }
    },
    created(){
      bus.$on('seriesId', (text) => {
        this.arr = [];
        this.seriesId = text;
        var _this = this;
        axios.get(baseUrl+'/controller/getModelList',{params:{
            seriesId:this.seriesId
          }
        })
        .then(function(res){
          _this.arr = res.data.result;
        })
      });
    },
    methods: {
      selectItem(a,b){
        bus.$emit('modelId', a);
        bus.$emit('modelName', b);
      }
    }
  }
</script>

